|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.TranslationTableModel
public class TranslationTableModel
This Java class represents a translation table as seen when it comes from the back-end database system.
The order of the rows in a translation table is very important and determines the output
result when searching in the translation table using any of the following criteria:
STARTS_WITH, ENDS_WITH,
or CONTAINS or IS_CONTAINED.
Ensure that any table that you create or modify are sorted in the correct order.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="translationTable">
<xs:complexType>
<xs:sequence>
<xs:element ref="inAttribute" minOccurs="0" maxOccurs="5"/>
<xs:element ref="outAttribute" minOccurs="0" maxOccurs="15"/>
<xs:element ref="tableInstance" minOccurs="0" maxOccurs="1"/>
<xs:element ref="tableInstanceChronology" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="owner" type="xs:string" use="required"/>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="useDates" type="xs:boolean" default="false" />
<xs:attribute name="disallowDuplicateInputs" type="xs:boolean" default="false" />
</xs:complexType>
</xs:element>
<xs:element name="tableInstanceChronology">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
| Field Summary | |
|---|---|
static int |
CONTAINS
Contains comparison operator. |
static int |
ENDS_WITH
Ends with comparison operator. |
static int |
EQUALS
Equality comparison operator. |
static int |
IS_CONTAINED
Is_contained comparison operator. |
static int |
MAX_IN_ATTRIBUTES
The maximum input attribute count. |
static int |
MAX_OUT_ATTRIBUTES
The maximum output attribute count. |
static int |
STARTS_WITH
Starts with comparison operator. |
| Constructor Summary | |
|---|---|
TranslationTableModel()
Builds an empty TranslationTableModel. |
|
TranslationTableModel(java.lang.String code,
java.lang.String description)
Builds a TranslationTableModel from a code and a description. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
void |
addInAttribute(InAttributeModel attribute)
Adds an in attribute. |
void |
addOutAttribute(OutAttributeModel attribute)
Adds an out attribute. |
boolean |
checkValidity()
Returns true if the translation table is valid. |
java.lang.String |
getCode()
Gets the code. |
java.lang.String |
getDescription()
Gets the description. |
boolean |
getDisallowDuplicateInputs()
Returns true if the translation table disallows duplicate input attributes. |
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
getDuplicateInputsMap()
Returns a map which keys and values are rows indexes. |
java.util.Vector<InAttributeModel> |
getInAttributes()
Gets the in attributes. |
TranslationInstanceModel |
getInstance()
Gets the instance. |
ChronologyModel |
getInstanceChronology()
Gets the instance chronology. |
java.util.Vector<OutAttributeModel> |
getOutAttributes()
Gets the out attributes. |
java.lang.String |
getOwner()
Gets the owner. |
java.lang.String |
getReference()
Gets the reference. |
java.lang.String |
getTagName()
Gets the XML tag name of the HCI model. |
boolean |
getUseDates()
Returns true if the translation table uses validity dates, false otherwise. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
removeInAttribute(int index)
Removes an in attribute. |
void |
removeOutAttribute(int index)
Removes an out attribute. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setCode(java.lang.String c)
Sets the code. |
void |
setDescription(java.lang.String d)
Sets the description. |
void |
setDisallowDuplicateInputs(boolean disallow)
Sets whether the translation table disallows duplicate input attributes. |
void |
setInAttributes(java.util.Vector<InAttributeModel> inAttributes)
Sets the in attributes. |
void |
setInstance(TranslationInstanceModel i)
Sets the instance. |
void |
setOutAttributes(java.util.Vector<OutAttributeModel> outAttributes)
Sets the out attributes. |
void |
setOwner(java.lang.String p)
Sets the owner. |
void |
setReference(java.lang.String r)
Sets the reference. |
void |
setUseDates(boolean use)
Sets whether the translation table use validity dates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EQUALS
public static final int STARTS_WITH
public static final int ENDS_WITH
public static final int CONTAINS
public static final int IS_CONTAINED
public static final int MAX_OUT_ATTRIBUTES
public static final int MAX_IN_ATTRIBUTES
| Constructor Detail |
|---|
public TranslationTableModel()
public TranslationTableModel(java.lang.String code,
java.lang.String description)
code - The codedescription - The description| Method Detail |
|---|
public java.lang.String getReference()
public void setReference(java.lang.String r)
r - The referencepublic TranslationInstanceModel getInstance()
public void setInstance(TranslationInstanceModel i)
i - The instancepublic java.lang.String getCode()
public void setCode(java.lang.String c)
c - The codepublic java.lang.String getDescription()
public void setDescription(java.lang.String d)
d - The descriptionpublic void setInAttributes(java.util.Vector<InAttributeModel> inAttributes)
inAttributes - A vector of InAttributeModel representing the in attributespublic java.util.Vector<InAttributeModel> getInAttributes()
InAttributeModel representing the in attributespublic void setOutAttributes(java.util.Vector<OutAttributeModel> outAttributes)
outAttributes - A vector of OutAttributeModel representing the out attributespublic java.util.Vector<OutAttributeModel> getOutAttributes()
OutAttributeModel representing the out attributespublic void addInAttribute(InAttributeModel attribute)
attribute - The in attribute to addpublic void removeInAttribute(int index)
index - The index of the in attribute to removepublic void addOutAttribute(OutAttributeModel attribute)
attribute - The out attribute to addpublic void removeOutAttribute(int index)
index - The index of the out attribute to removepublic java.lang.String getOwner()
getOwner in interface ICatalogObjectpublic void setOwner(java.lang.String p)
p - The ownerpublic ChronologyModel getInstanceChronology()
TranslationInstanceModel elementspublic boolean getUseDates()
public void setUseDates(boolean use)
use - true if the translation table use validity dates, false otherwisepublic boolean getDisallowDuplicateInputs()
Duplicate input attributes exist when two rows, which are valid during a common period of time, have same input attributes.
When duplicate input attributes are not allowed, then an exception is thrown by translation table creation or modification operations if such duplicate exists in the passed translation table.
public void setDisallowDuplicateInputs(boolean disallow)
disallow - Indicates whether the translation table must disallow duplicate input attributesgetDisallowDuplicateInputs()public boolean checkValidity()
public java.util.HashMap<java.lang.Integer,java.lang.Integer> getDuplicateInputsMap()
getDisallowDuplicateInputs()public java.lang.String getTagName()
ITagNameProvider
getTagName in interface ITagNameProviderpublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||